<template>
	<uni-popup ref="loginModal" type="dialog">
		<uni-popup-dialog type="input" :title="'提示'" :content="'请登录'" :duration="2000" @confirm="confirmLogin" @close="close" :before-close="true">
		</uni-popup-dialog>
	</uni-popup>
</template>

<script>
	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
	export default {
		components: {
			uniPopupDialog
		},
		
		data(){
			return{
				type:'' //一般为 no_replace 不用 replace跳转
			}
		},

		methods: {
			confirmLogin() {
				this.$refs.loginModal.close()
				
				this.$tab.navigateTo('/pages/public/login')
			},
			openLogin(type) {
				this.type = type
				this.$refs.loginModal.open()
			},
			close(fn) {
				this.$refs.loginModal.close()
			}
		}
	}
</script>

<style>
</style>